// 告警级别
export type AlarmLevel = '高危' | '中危' | '低危'

// 处理状态
export type AlarmStatus = '未处理' | '处理中' | '已解决'

// 告警类型
export const ALARM_TYPES = {
  DGA: 'DGA域名访问',
  DNS_TUNNEL: 'DNS隧道',
  WEBSHELL: 'Webshell检测',
  BACKDOOR: '后门连接',
  SCAN: '端口扫描',
  EXPLOIT: '漏洞利用',
  MALWARE: '恶意软件',
  BOTNET: '僵尸网络',
  DATA_LEAK: '数据泄露',
  BRUTE_FORCE: '暴力破解'
} as const

export type AlarmType = typeof ALARM_TYPES[keyof typeof ALARM_TYPES]

// 告警数据接口
export interface AlarmData {
  alarmId: string
  timestamp: string
  level: AlarmLevel
  type: AlarmType
  sourceIp: string
  targetDomain: string
  status: AlarmStatus
  description: string
}

// 告警统计数据接口
export interface AlarmStats {
  unprocessed: number
  processing: number
  resolved: number
  total: number
}

// 告警分布数据接口
export interface AlarmDistribution {
  name: string
  value: number
}

// 告警趋势数据接口
export interface AlarmTrend {
  dates: string[]
  all: number[]
  high: number[]
  medium: number[]
  low: number[]
}

// 搜索参数接口
export interface AlarmSearchParams {
  dateRange?: [string, string]
  level?: AlarmLevel
  status?: AlarmStatus
  type?: AlarmType
  keyword?: string
  page?: number
  pageSize?: number
}

// 分页响应接口
export interface PaginatedResponse<T> {
  total: number
  items: T[]
} 